import java.util.*;

/**
 * @author LKQ
 * @date 2022/5/15 16:10
 * @description 位运算
 */
public class Solution {
    public static void main(String[] args) {

    }
    public int largestCombination(int[] candidates) {
        int ans = 0;
        for (int i = 0; i < 31; i++) {
            int bit = (1 << i), cnt = 0;
            for (int candidate : candidates) {
                if ((candidate & bit) == bit) {
                    cnt++;
                }
            }
            ans = Math.max(ans, cnt);
        }
        return ans;
    }
}
